﻿GO
--password is b
INSERT INTO [User] ([Login], Name, PasswordHash, PasswordSalt, [Profile], [Enabled])
Values ('admin', 'UCS Admin', 'dn0MrreOZUWfVT/3hnRpJGHnREocArom+X1NKPUSCYs=','wJ07QKg2GocoEFhYddHBSJBFarbLfUnDH6OmQAdLSBQ=', 'Admin', 1)

--Insert default Escalation Profiles
INSERT INTO EscalationProfile (Name) Values ('CRITICAL')
INSERT INTO EscalationProfile (Name) Values ('MAJOR')
INSERT INTO EscalationProfile (Name) Values ('MINOR')

--Critical EsclationActions
INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='CRITICAL'),1,'Sys Admin','555-1212',10,0,'SMS')

INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='CRITICAL'),2,'Sys User','555-1313',10,0,'SMS')

INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='CRITICAL'),3,'Operator','555-1414',10,0,'PHONE')

--Major Esclation Actions
INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='MAJOR'),1,'Sys Admin','555-1212',20,0,'SMS')

INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='MAJOR'),2,'Sys User','555-1313',20,0,'PHONE')

INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='MAJOR'),3,'Operator','555-1414',20,0,'EMAIL')

--MINOR Esclation Actions
INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='MINOR'),1,'Sys Admin','555-1212',60,0,'EMAIL')

INSERT INTO EscalationAction (EscalationProfileID, [Order], Name, PhoneEmail, ResponseTime, Recurring, Type)
Values ((Select ID From EscalationProfile Where Name ='MINOR'),2,'Operator','555-1414',60,0,'NONE')

--Insert VoiceSystem
INSERT INTO VoiceSystem (Name, SwitchType) Values ('Avaya', 'AvayaCM')

--Report Commands
INSERT INTO	ReportCommand (Command1) Values ('list measurements call-summary')
INSERT INTO	ReportCommand (Command1) Values ('list measurements trunk-group summary last-hour')

INSERT INTO ReportRunner (VoiceSystemID, ReportName, [Enabled], RunTime, Running, ReportCommandID, StartText, EndText)
Values ((SELECT ID From VoiceSystem WHERE Name = 'Avaya'), 'CallSummaryReport', 1, '60-Minute', 0 , 1,'Hour Voice  Data', '7mCommand successfully completed')

INSERT INTO ReportRunner (VoiceSystemID, ReportName, [Enabled], RunTime, Running, ReportCommandID, StartText, EndText)
Values ((SELECT ID From VoiceSystem WHERE Name = 'Avaya'), 'TrunkGroupSummaryReport', 1, '24-Hour', 0 , 2,'No.  Siz Type Dir', '7[23;0H[0;7m ')

--Default System Settings
INSERT INTO SystemSetting (Name, Value) Values ('AlarmDashboardBackgroundImage','/img/map.png')

